//
//  KVCController.m
//  StudyingDemo
//
//  Created by GuoMS on 2018/6/9.
//  Copyright © 2018年 gms. All rights reserved.
//

#import "KVCController.h"
#import "KvcPerson.h"

/**
 关于KVC valueForKey 调用顺序
调用相关方法的先后顺序是
  getter方法：getKey（K大写）-> key -> isKey
  
 
如果没有设置了方法 + (BOOL)accessInstanceVariablesDirectly
  YES  找成员变量，先后顺序是：_key -> _isKey -> key -> isKey
  NO  异常
 */


@interface KVCController ()

@end

@implementation KVCController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"KVC";
    KvcPerson *p = [KvcPerson new];
    NSString *testValue = [p valueForKey:@"name"];

    
}




@end
